package com.zt.teacher.dao;

import com.zt.common.Do.ClassWithTeachDO;
import com.zt.common.pojo.ActiveClass;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description:
 * author:zt
 * date:2021-12-16
 */

@Mapper
public interface ActiveClassDao {

    void insert(ActiveClass activeClass);

    List<ActiveClass> getClassByTeacherId(String teacherId);

    List<ActiveClass> getClassByOriginClassId(@Param("semester") String semester, @Param("originClassIds") List<Integer> originClassIds);

    List<ActiveClass> getClassByTeacherIdAndSemester(@Param("semester") String semester, @Param("teacherId") String teacherId);

    List<ActiveClass> getElectiveClassBySemester(String semester);

    ActiveClass getClassById(int id);

    List<ClassWithTeachDO> getStudentSelectedClass(@Param("studentId") String studentId, @Param("semester") String semester);

    List<ActiveClass> getClassByTeaAndStuId(@Param("teacherId") String teacherId, @Param("studentId") String studentId, String semester);

    void update(ActiveClass activeClass);
}
